#include <stdio.h>
#include<stdlib.h>
#include<malloc.h>

int main(void)
{
    int *p=(int *)malloc(sizeof(int)*25);
    printf("p指向的内存大小:%ld\n",malloc_usable_size(p));
    printf("p地址:%p",p);

    //扩大内存
    p=realloc(p,sizeof(int)*100);
    printf("p指向的内存大小:%ld\n",malloc_usable_size(p));
    printf("p地址:%p",p);

    //缩小内存
    p=realloc(p,sizeof(int)*1);
    printf("p指向的内存大小:%ld\n",malloc_usable_size(p));
    printf("p地址:%p",p);
    return 0;
}